<!doctype html> 
<html> 
<head> 
  <meta charset="utf-8"/>
  <title>后台管理系统</title>
  <meta name="author" content="DeathGhost" />
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <!--[if lt IE 9]>
  <script src="js/html5.js"></script>
  <![endif]-->
<script src="js/jquery.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script>
	(function($){
		$(window).load(function(){
			
			$("a[rel='load-content']").click(function(e){
				e.preventDefault();
				var url=$(this).attr("href");
				$.get(url,function(data){
					$(".content .mCSB_container").append(data); //load new content inside .mCSB_container
					//scroll-to appended content 
					$(".content").mCustomScrollbar("scrollTo","h2:last");
				});
			});
			
			$(".content").delegate("a[href='top']","click",function(e){
				e.preventDefault();
				$(".content").mCustomScrollbar("scrollTo",$(this).attr("href"));
			});
			
		});
	})(jQuery);
</script>

</head>
<body>
	<section class="rt_wrap content mCustomScrollbar">
 <div class="rt_content">






     <section>
      <h2><strong style="color:grey;">分列内容布局</strong></h2>
      <ul class="ulColumn2">

       <li>
        <span class="item_name" style="width:120px;">网站名称：</span>
        <input type="text" class="textbox textbox_295" disabled="disabled" value="牙行"/>
        
       </li>
       
       <li>
        <span class="item_name" style="width:120px;">网站URL：</span>
        <input type="text" class="textbox textbox_295" disabled="disabled" value="www.yahangjob.com" />
        
       </li>

       <li>
        <span class="item_name" style="width:120px;">覆盖城市：</span>
        @if($myregion)
        @foreach($myregion as $v)
        <span class='link_btn'>{{$v->city_name}}</span>
        @endforeach
        @endif
        <span class='link_btn' id='cityAdd'>[+]</span><br>
      </li>
      <li class="city" style="display:none;">  
            
              <span class="item_name" style="width:120px;">选择城市:</span>
              <span class='item_name'>
                <select name="sheng" id="sheng" onchange="shic()">
                  <option value="">请选择...</option>
                </select>
                <select name="shi" id="shi" >
                  <option value="">请选择...</option>
                </select>
               <!--  <select name="qu" id="qu">onchange="quc()"
                  <option value="">请选择...</option>
                </select> -->
              </span>
              <span class='link_btn' id='cityOk'>
                确定
              </span>
              <span class='link_btn' id="cityFail">
                取消
              </span>
      </li>
      <script>
        $(function(){
          sheng();
        })
        //省
        function sheng(){
          var url="liandong";
          var data={'id':1,'_token':"{{csrf_token()}}"};
          $.post(url,data,function(msg){
            for(var i=0;i<msg.length;i++){
            //位下拉列表赋值
            //得到 value属性值 显示值
            var region_id=msg[i].region_id;
            var region_name=msg[i].region_name;
            var op=new Option(region_name,region_id);
            $('#sheng')[0].options.add(op);
            }
          },'json')
        }
        //市
        function shic(){
          var url="liandong";
          //获得省id
          var id=$('#sheng').val();
          //alert(id);
          var data={'id':id,'_token':"{{csrf_token()}}"};
          $.post(url,data,function(msg){
            $("#shi")[0].length=0;
            for(var i=0;i<msg.length;i++){
            //位下拉列表赋值
            //得到 value属性值 显示值
            var region_id=msg[i].region_id;
            var region_name=msg[i].region_name;
            var op=new Option(region_name,region_id);
            $('#shi')[0].options.add(op);
            }
          },'json')
        }

        $('#cityAdd').click(function(){
          $('.city').show();
          $('#cityAdd').hide();
        });
        $('#cityOk').click(function(){
          $('.city').hide();
          $('#cityAdd').show();
          var op=$('#shi option:selected');
          var c_id=op.val();
          var c_name=op.html()+'站';
          var url="cityAdd";
          var data={'region_id':c_id,'city_name':c_name,'_token':"{{ csrf_token() }}"};
          $.post(url,data,function(){});
        });
        $('#cityFail').click(function(){
          $('.city').hide();
          $('#cityAdd').show();
        })

      </script>
      <li>
        <span class="item_name" style="width:120px;">简介：</span>
        <textarea disabled="disabled"  class="textarea" style="width:500px;height:100px;">有最多的人才,有更多的就业机会</textarea>
      </li>
      <li>
        <span class="item_name" style="width:120px;">logo：</span>
        <img src="http://s3.com/gitDemo/public/homes/images/logo.png" alt="">
      </li>
      
      </ul>
     </section>
     <!--tabStyle-->
     <script>
     $(document).ready(function(){
		 //tab
		 $(".admin_tab li a").click(function(){
		  var liindex = $(".admin_tab li a").index(this);
		  $(this).addClass("active").parent().siblings().find("a").removeClass("active");
		  $(".admin_tab_cont").eq(liindex).fadeIn(150).siblings(".admin_tab_cont").hide();
		 });
		 });
     </script>


 </div>
</section>
</body>
<script type="text/javascript">
</script>
</html>


